/*
*
单入口
*/
package main

import (
	"log"
	"project/config"
	"project/models"
	"project/router"

	"github.com/gin-gonic/gin"
)

func main() {
	//设置模式
	gin.SetMode(config.ApplicationConfig.Mode)

	defer models.Close()
	r := router.RegisterRouter()
	if err := r.Run(config.ApplicationConfig.Host + ":" + config.ApplicationConfig.Port); err != nil {
		log.Fatal(err)
	}

}
